import React, { Component } from 'react'
import Child from '../Child'
import { Context } from '../../context'

export default class Parent extends Component {
  render() {
    return (
      <Context.Consumer>
        {(value) => (
          <div>
            Parent: {value.age}
            <hr />
            <Child />
          </div>
        )}
      </Context.Consumer>
    )
  }
}
